#pragma once

#include <windows.h>
#include <XInput.h>

namespace Xiol
{

/*
	VibrationMotorState
	This is a wrapper around the XINPUT_VIBRATION struct
	It provides copy construction, assignment and access to the underlying state
*/
class VibrationMotorState
{
public:
	VibrationMotorState();
	VibrationMotorState( const XINPUT_VIBRATION& vibrationStruct );
	VibrationMotorState( const VibrationMotorState& other );
	VibrationMotorState& operator=( const VibrationMotorState& other );

	// The motorID is 0 for left and 1 for right
	WORD getVibrationMotorSpeed( int motorID ) const;
	void setVibrationMotorSpeed( int motorID, WORD speed );

private:	
	XINPUT_VIBRATION mVibrationStruct;
};

}
